package com.silverhaze.diamond.client.ui.dialogs.view;

import com.silverhaze.diamond.common.entity.Customer;
import com.silverhaze.diamond.common.entity.Detail;
import com.silverhaze.diamond.common.entity.Service;
import com.silverhaze.diamond.client.ui.UIHelper;
import com.silverhaze.diamond.client.ui.dialogs.CustomerDialog;
import com.silverhaze.diamond.client.ui.dialogs.DetailDialog;
import com.silverhaze.diamond.client.ui.dialogs.DialogType;
import com.silverhaze.diamond.client.ui.dialogs.ServiceDialog;

/**
 * Created by Ivan Babanin (9:31:25 29.06.2008)
 * This part of code is strictly confidential.
 * © Magnificent Software Inc.
 */
public class ViewDialog {
    public static void service(Service service) {
        ServiceDialog serviceDialog = new ServiceDialog(service, DialogType.VIEW);
        serviceDialog.setVisible(true);
    }

    public static void customer(Customer customer) {
        CustomerDialog viewCustomer = new CustomerDialog(UIHelper.getMainFrame(), customer, DialogType.VIEW);
        viewCustomer.enableInput(false);
        viewCustomer.setVisible(true);
    }

    public static void detail(Detail detail) {
        DetailDialog.viewDetail(detail);
    }
}

